//
//  SignleCateoryCell.m
//  DogeLegs
//
//  Created by 宋华 on 2017/9/9.
//  Copyright © 2017年 宋华. All rights reserved.
//

#import "SignleCateoryCell.h"

@interface SignleCateoryCell () {

}

@property (weak, nonatomic) IBOutlet UIImageView *cateoryImageview;

@property (weak, nonatomic) IBOutlet UILabel *cateoryLabel;

@end

@implementation SignleCateoryCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)layoutSubviews {
    [super layoutSubviews];
//    WeakSelf(ws);
//    [self.cateoryImageview mas_updateConstraints:^(MASConstraintMaker *make) {
//        make.left.mas_equalTo(ws.mas_left).offset(15);
//        make.right.mas_equalTo(ws.cateoryLabel).offset(5);
//        make.centerY.mas_equalTo(ws.mas_centerY);
//        make.width.mas_equalTo(12);
//        make.height.mas_equalTo(12);
//    }];
//    
//    [self.cateoryLabel mas_updateConstraints:^(MASConstraintMaker *make) {
//        make.centerY.mas_equalTo(ws.mas_centerY);
//        make.left.mas_equalTo(ws.cateoryImageview.mas_right).offset(5);
//    }];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)cellWillDisplay:(PostCellType)type labelText:(NSString *)text {
    if (type == PostCellType_location) {
        self.cateoryImageview.image = [UIImage imageNamed:@"photo"];
    } else {
        self.cateoryImageview.image = [UIImage imageNamed:@"photo"];
    }
    self.cateoryLabel.text = text;
}

@end
